Zoom

interface Zoom

Allows configuring zoom level for the domain of the currently loaded web page.

A Zoom instance belongs to Browser and can be used only if Browser is alive. When Browser is closed, the Zoom instance automatically updates its internal state and does not allow modifying zoom anymore. The IllegalStateException will be thrown in this case.

The zoom level is configured for each domain separately, so if you set zoom level for "a.com", it will not be applied for "b.com". If you change zoom level for one domain and then load another one, then the zoom level for another domain will be default.

The zoom level per domain configurations are kept by the Profile instance, and they are preserved after closing a Browser the Zoom instance belongs to.

Properties

Link copied to clipboard

Browser instance of this Zoom.

Link copied to clipboard

Indicates whether zoom level can be changed or not.

Link copied to clipboard

The zoom level associated with the domain of the currently loaded web page.

Functions

Link copied to clipboard
abstract fun browser(): Browser
Returns the Browser instance of this zoom.
Link copied to clipboard
abstract fun disable()
Disables the possibility to change zoom levels for the loaded web pages and resets zoom level of the loaded web pages to the default value.
Link copied to clipboard
abstract fun enable()
Enables the possibility to change zoom levels for the loaded web pages.
Link copied to clipboard
abstract fun in()
Performs zoom in on the currently loaded web page.
Link copied to clipboard
abstract fun isEnabled(): Boolean
Indicates whether zoom level can be changed or not.
Link copied to clipboard
abstract fun level(): ZoomLevel
Returns the zoom level associated with the domain of the currently loaded web page.
abstract fun level(zoomLevel: ZoomLevel)
Updates the zoom level for the domain of the currently loaded web page.
Link copied to clipboard
abstract fun out()
Performs zoom out on the currently loaded web page.
Link copied to clipboard
abstract fun reset()
Resets zoom level for the domain of the currently loaded web page to the default value.